<template>
  <div style="width: 100%; height: 100%">
    <div class="zbox">
      <div class="zt">双线质量管控体</div>
      <div class="zt1">力求每件产品、每个细节都尽善尽美</div>
      <div class="zt2">够专业 才放心</div>
      <div class="dbbox">
        <div class="dbzt">
          All Rights Reserved ©2021 版权所有 ｜ 粤ICP备18069755号
        </div>
        <div class="jz">ORDER聚造</div>
        <div class="xjz">ORDER聚造</div>
      </div>

      <div class="xbox">
        <div class="box1"></div>
        <div class="box2"></div>
      </div>

      <div class="rightbox">
        <div class="rbox">
          <div class="zt3">欢迎光临</div>
          <div class="dlzt">系统登录</div>

    <el-form
      :model="ruleForm"
      :hide-required-asterisk="true"
      :rules="rules"
      ref="ruleForm"
      label-width="100px"
      class="demo-ruleForm"
    >
      <div class="xxk">
        <el-form-item label="用户名" prop="userName">
          <el-input autosize v-model="ruleForm.userName">
            <img src="../assets/user.png" class="tp" slot="prefix" />
          </el-input>
        </el-form-item>
      </div>
            <div class="xxk" style="position: absolute; top: 380px">
        <el-form-item label="密   码" prop="passWord">
          <el-input autosize type="password" v-model="ruleForm.passWord">
            <img src="../assets/mm.png" class="tp" slot="prefix" />
          </el-input>
        </el-form-item>
      </div>
    </el-form>

          <div class="lk" @click="submitForm">
            <div class="dl">登录</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

import md5 from "js-md5";
console.log(md5("111111"));
//import HelloWorld from './components/HelloWorld.vue'

export default {
  name: "App",

  components: {
    //HelloWorld
  },
  data() {
    return {
      ruleForm: {
        userName: "",
        passWord: "",
      },
      rules: {
        userName: [
          { required: true, message: "请输入用户名", trigger: "blur" },
        ],
        passWord: [{ required: true, message: "请输入密码", trigger: "blur" }],
      },
    };
  },
  methods: {
    submitForm() {
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          this.$http({
            url: "/login",
            method: "POST",
            data: {
              userName: this.ruleForm.userName,
              passWord: md5(this.ruleForm.passWord),
              platform: "Web",
            },
          }).then((res) => {
            if (!res.errorMsg) {
              localStorage.setItem("token", res.token);
              localStorage.setItem("user", JSON.stringify(res));
              this.$router.push("/index");
            }
          });
        }
      });
    },
  },
  created() {},
  mounted() {},
};
</script>
<style scoped>
/* html,
* {
  margin: 0;
  padding: 0;
} */

.zbox {
  width: 1366px;
  height: 100%;
  top: 0;
  left: 0;
  min-width: 1000px;

  display: flex;
  position: fixed;
  background-size: 100%;
  background: url(../assets/image1.png) no-repeat;
}

.xbox {
  z-index: 10;
  width: 207px;
  height: 326px;
  margin-left: 85px;
  margin-top: 202px;
}
.box1 {
  width: 115px;
  height: 162px;
  background: #e1f2f9;
  border-radius: 0px 0px 0px 0px;
  opacity: 0.3;
}
.box2 {
  width: 132px;
  height: 164px;
  background: #e1f2f9;
  margin-left: 72px;
  border-radius: 0px 0px 0px 0px;
  opacity: 0.3;
}
.zt {
  width: 23px;
  font-size: 18px;
  position: absolute;
  top: 202px;
  left: 125px;
  color: #fefefe;
}
.zt1 {
  width: 20px;
  font-size: 16px;
  font-weight: normal;
  color: #ffffff;
  position: absolute;
  left: 170px;
  top: 202px;
}
.zt2 {
  width: 35px;
  font-size: 28px;
  font-weight: normal;
  color: #6bb9da;
  position: absolute;
  top: 260px;
  left: 210px;
}
.rightbox {
  z-index: 10;
  width: 359px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 768px;
  margin-left: 633px;
}
.rbox {
  width: 359px;
  height: 359px;
  z-index: 20;

  /* position: fixed; */
  background: #efeff0;
  border-radius: 20px 20px 20px 20px;
  opacity: 0.9;
}
.zt3 {
  width: 52px;
  height: 16px;
  font-size: 13px;
  margin-top: 23px;
  margin-left: 32px;
  font-weight: normal;
  color: #96a3b0;
}
.dlzt {
  width: 150px;
  height: 40px;
  font-size: 27px;
  margin-top: 6px;
  margin-left: 32px;
  font-weight: normal;
  color: #4e4e4e;
}
.xxk {
  display: flex;
  height: 37px;
  width: 304px;
  z-index: 20;
  position: absolute;
  top: 320px;
  left: 900px;
}
.zt4 {
  width: 50px;
  font-size: 13px;
  line-height: 37px;
  color: #737474;
}
.kk {
  display: flex;
  width: 256px;
  height: 37px;
  background: #f1f1f1;
  border-radius: 5px 5px 5px 5px;
  opacity: 1;
  margin-left: 8px;
  border: 1px solid #dfefff;
}
.tp {
  width: 12px;
  height: 14px;
  margin-top: 13px;
  margin-left: 5px;
}
.lk {
  display: flex;
  width: 302px;
  height: 38px;
  background: #409eff;
  margin-top: 170px;
  margin-left: 31px;
  border-radius: 19px 19px 19px 19px;
  opacity: 1;
}
.dl {
  width: 32px;
  height: 20px;
  font-size: 16px;
  margin-top: 18px;
  margin-left: 135px;
  color: #f4f4f5;
  line-height: 0px;
}

.dbbox {
  display: flex;
  height: 46px;
  width: 875px;
  position: absolute;
  top: 570px;
  left: 446px;
}
.dbzt {
  width: 406px;
  height: 16px;
  font-size: 13px;
  margin-top: 22px;
  font-weight: normal;
  color: #565656;
}
.jz {
  width: 200px;
  height: 46px;
  font-size: 36px;
  margin-left: 267px;
  white-space: nowrap;
  font-weight: normal;
  color: #d7e8fa;
}
.xjz {
  width: 112px;
  height: 25px;
  font-size: 20px;
  white-space: nowrap;
  margin-left: -195px;
  margin-top: 25px;
  font-weight: normal;
  color: #409eff;
}
/* .app1{
  background:url('/image/test.png');
  height: 300px;
} */
</style>
